package com.ruoyi.system.service.impl;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaWorkerMoneyChange;
import com.ruoyi.system.mapper.JiajiaWorkerMoneyChangeMapper;
import com.ruoyi.system.service.IJiajiaWorkerMoneyChangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 社工余额变动记录Service业务层处理
 * 
 * @author knd
 * @date 2021-11-02
 */
@Service
public class JiajiaWorkerMoneyChangeServiceImpl implements IJiajiaWorkerMoneyChangeService
{
    @Autowired
    private JiajiaWorkerMoneyChangeMapper jiajiaWorkerMoneyChangeMapper;

    /**
     * 查询社工余额变动记录
     * 
     * @param id 社工余额变动记录主键
     * @return 社工余额变动记录
     */
    @Override
    public JiajiaWorkerMoneyChange selectJiajiaWorkerMoneyChangeById(Long id)
    {
        return jiajiaWorkerMoneyChangeMapper.selectJiajiaWorkerMoneyChangeById(id);
    }

    /**
     * 查询社工余额变动记录列表
     * 
     * @param jiajiaWorkerMoneyChange 社工余额变动记录
     * @return 社工余额变动记录
     */
    @Override
    @DataScope(deptAlias="d")
    public List<JiajiaWorkerMoneyChange> selectJiajiaWorkerMoneyChangeList(JiajiaWorkerMoneyChange jiajiaWorkerMoneyChange)
    {
        return jiajiaWorkerMoneyChangeMapper.selectJiajiaWorkerMoneyChangeList(jiajiaWorkerMoneyChange);
    }

    /**
     * 新增社工余额变动记录
     * 
     * @param jiajiaWorkerMoneyChange 社工余额变动记录
     * @return 结果
     */
    @Override
    public int insertJiajiaWorkerMoneyChange(JiajiaWorkerMoneyChange jiajiaWorkerMoneyChange)
    {
        return jiajiaWorkerMoneyChangeMapper.insertJiajiaWorkerMoneyChange(jiajiaWorkerMoneyChange);
    }

    /**
     * 修改社工余额变动记录
     * 
     * @param jiajiaWorkerMoneyChange 社工余额变动记录
     * @return 结果
     */
    @Override
    public int updateJiajiaWorkerMoneyChange(JiajiaWorkerMoneyChange jiajiaWorkerMoneyChange)
    {
        return jiajiaWorkerMoneyChangeMapper.updateJiajiaWorkerMoneyChange(jiajiaWorkerMoneyChange);
    }

    /**
     * 批量删除社工余额变动记录
     * 
     * @param ids 需要删除的社工余额变动记录主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerMoneyChangeByIds(String ids)
    {
        return jiajiaWorkerMoneyChangeMapper.deleteJiajiaWorkerMoneyChangeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除社工余额变动记录信息
     * 
     * @param id 社工余额变动记录主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerMoneyChangeById(Long id)
    {
        return jiajiaWorkerMoneyChangeMapper.deleteJiajiaWorkerMoneyChangeById(id);
    }
}
